const mongoose = require('mongoose');
var Schema = mongoose.Schema;
//goodsSchema
var goodSchema = new Schema({
    goods_name: String,                  //商品名称
    goods_unit: String,                  //商品单位
    goods_sort_id: Number,               //商品排序
    goods_sort_first: String,            //商品父级分类
    goods_sort_second: String,           //商品子分类
    goods_have_saled: Number,            //商品已出售
    goods_limit_buy: Number,             //商品限制购买
    goods_weight: Number,                //商品重量
    goods_cover_img: String,             //商品封面图
    goods_detail_img: Array,             //商品详情图
    goods_sell_price: Number,            //商品售价
    goods_cost_price: Number,            //商品成本价
    goods_original_price: Number,        //商品原价
    goods_service_content: String,       //服务详情
    goods_single_postage: String,        //商品满件包邮
    goods_sale_postage: String,          //商品满额包邮
    goods_detail_explain: String,        //商品详解
    goods_stock: String,                 //商品库存
    goods_id: Number,                    //商品货号
    goods_integration_dudection: Number, //积分抵扣
    goods_integration_give: Number,      //积分赠送
    goods_detail_introduce: String,      //商品图文
    goods_show_position:String           //展示位置
});

const userSchema = new Schema({
    nickName:String,   //????
    gender:Number,     //????
    avatarUrl:String,  //????
    language:String,   //????
    country:String,    //????
    province:String,   //????
    city:String,       //????
    user_address:Array,//????
    user_credit:String,//????
    user_gifts:Array,  //????
    user_given:Array,  //????
    user_phone:String, //????
    user_tickets:Array,//?????
    openid:String,   //??openid
    user_ip:String,
    unionid:String,
    pwd:String,
    code:String
});
module.exports = {
    goodSchema,
    userSchema
};